#include<stdio.h>
int main(void)
{
	char arr1[100],arr2[100],*r,*p,*q;
	gets(arr1);
	gets(arr2);
	p=arr1;
	q=arr2;
	r=p;
	p=q;
	q=r;
	puts(p);
	puts(q);
	return 0;
}
